import os
import yaml


def get_path(path):
    return os.path.abspath(
        os.path.join(
            os.path.dirname(__file__),
            f'../{path}'
        )
    )


def get_yaml_data(file_path):
    with open(file_path, encoding="utf-8") as file:
        return yaml.full_load(file)


def get_log_conf():
    return get_yaml_data(get_path('config/logConf.yaml'))


def get_project_conf():
    return get_yaml_data(get_path('config/projectConf.yaml'))
